package com.ithao.service;

import com.ithao.entity.PageResult;
import com.ithao.entity.QueryPageBean;
import com.ithao.pojo.Permission;
import com.ithao.pojo.Role;

import java.util.List;

/**
 * @author : ZhangHao
 * @version :1.0
 * @date :Created in 2020/4/2
 * @description :
 */
public interface RoleService {

    List<Role> findAll();

    PageResult findPage(QueryPageBean queryPageBean);

    void add(Role role, Integer[] permissionIds);

    Role findById(Integer id);

    /**
     * 根据角色Id查询角色的所有权限
     * @param id
     * @return
     */
    List<Permission> findPermissionByRole(Integer id);

    void update(Role role, Integer[] permissionIds);

    void delete(Integer id);
}
